#include "stm32f10x.h"                  // Device header
#include "Motor.h"
#include "Delay.h"
void Car_Init(void)
{
	Motor_Init();
}

void Go_Ahead(void)
{
	Motor_SetLeftSpeed(50);
	Motor_SetRightSpeed(-50);
}

void Go_Back(void)
{
	Motor_SetLeftSpeed(-50);
	Motor_SetRightSpeed(50);
}

void Turn_Left(void)
{
	Motor_SetLeftSpeed(0);
	Motor_SetRightSpeed(-30);
}
void Turn_Right(void)
{
	Motor_SetRightSpeed(0);
	Motor_SetLeftSpeed(30);
	
}

void Self_Left(void)
{
	Motor_SetLeftSpeed(-25);
	Motor_SetRightSpeed(-25);
}
void Self_Right(void)
{
	Motor_SetLeftSpeed(25);
	Motor_SetRightSpeed(25);
}

void Car_Stop(void)
{
	Motor_SetLeftSpeed(0);
	Motor_SetRightSpeed(0);
}

void My_Turn_Right(int8_t Speed)
{
	Motor_SetRightSpeed(0);
	Motor_SetLeftSpeed(Speed);
}

void My_Turn_Left(int8_t Speed)
{
	Motor_SetLeftSpeed(0);
	Motor_SetRightSpeed(-Speed);
}

void Go_Ahead_1(void)
{
	Motor_SetLeftSpeed(30);
	Motor_SetRightSpeed(-30);
}

void Go_Back_1(void)
{
	Motor_SetLeftSpeed(-30);
	Motor_SetRightSpeed(30);
}
